<template>
	<van-swipe v-if="adTopCarouselList&&adTopCarouselList.length>0" class="my-swipe" :autoplay="400000" indicator-color="white" lazy-render>
		<van-swipe-item v-for="image in adTopCarouselList" :key="image.img">
			<a @click="to(image.href)"><img :src="image.img" alt=""/></a>
		</van-swipe-item>
	</van-swipe>
</template>
<style lang="scss" scoped>
.my-swipe{
	margin:10px;
	border-radius: 8px;
	box-shadow: 1px 1px 8px rgb(0 0 0 / 10%);
	overflow:hidden;
	.van-swipe-item {
		color: #fff;
		display:flex; justify-content:center; align-items: center;
		background-color:var(--nav-font-color);
		aspect-ratio: 2.4;
		a{display:block;width:100%;aspect-ratio: 2.4;overflow:hidden;}
		.van-image{width:100%;aspect-ratio: 2.4;}
		:deep(.van-image__img),img{width:100%;aspect-ratio: 2.4;display:block;}
		.van-icon,.iconfont{color:var(--nav-bg-color);}
	}
}
</style>
<script setup lang="ts">
//店铺首页轮播图
const adTopCarouselList = ref([
	{img:'https://www.woego.cn/woego/image/64196130b0d37bb5aa85c96d.jpg',href:'https://www.woego.cn/woego/pageConfig/queryPubLayout_new?pageId=12297&pageType=2'},
	{img:'https://www.woego.cn/woego/image/64196152b2a4cd0abec4b5d8.jpg',href:'https://www.woego.cn/woego/pageConfig/queryPubLayout_new?pageId=9048&pageType=2'},
	{img:'https://www.woego.cn/woego/image/647ff9fceb19d30a7053e5b2.jpg',href:'https://www.woego.cn/woego/banmanager/toPerseInfoDetail?perseId=20945'},

])
const {to} =useGoto()
</script>